#include "Shared.h"
#include "GlobalHeader.h"
#include "IVirtualDiskProxyImpl.h"

#ifdef _MANAGED
#pragma managed(push, off)
#endif ///_MANAGED

BOOL APIENTRY DllMain( HMODULE hModule,
					  DWORD  ul_reason_for_call,
					  LPVOID lpReserved
					  )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

#ifdef _MANAGED
#pragma managed(pop)
#endif ///_MANAGED

IVIRTUALDISKPROXY_API IVirtualDiskProxy* _stdcall GetVirtualDiskProxy()
{
	return new IVirtualDiskProxyImpl;
}

IVIRTUALDISKPROXY_API void _stdcall DestroyVirtualDiskProxy(IVirtualDiskProxy* pIVirtualDiskProxy)
{
	IVirtualDiskProxyImpl* pIVirtualDiskProxyImpl = dynamic_cast<IVirtualDiskProxyImpl*>(pIVirtualDiskProxy);
	pIVirtualDiskProxyImpl->RealseSelf();
}

IVIRTUALDISKPROXY_API void _stdcall ShowAbsolutePath(IVirtualDiskProxy* pIVirtualDiskProxy)
{
	IVirtualDiskProxyImpl* pIVirtualDiskProxyImpl = dynamic_cast<IVirtualDiskProxyImpl*>(pIVirtualDiskProxy);
	pIVirtualDiskProxyImpl->ShowAbsolutePath();
}